package com.cskaoyan.service;

import org.springframework.stereotype.Service;

/**
 * @author stone
 * @date 2022/04/26 14:39
 */
@Service
public class UserServiceImpl implements UserService{
    @Override
    public void sayHello() {
        System.out.println("hello world");
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    @Override
    public int add(int num1, int num2) {
        int result = num1 + num2;
        System.out.println("add方法调用结果：" + result);
        return result;
    }

    @Override
    public void throwException() {
        System.out.println("throwException");
        int i = 1 / 0;
    }


}
